<?php

$phone	= $_REQUEST["p"];	//手机号
$url	= $_REQUEST["l"];	//调用url

if($url){
	send_log_write($phone,$url);
}
function send_log_write($phone,$url) {
	$message = "\n\r".date("M d H:i:s ")."[".$phone."]:\n\r" . $url."\n\r";
	$the_log_file = $_SERVER["DOCUMENT_ROOT"] . "/logs/phone" . date("ymd") . ".log";
	if (!($fp = @ fopen($the_log_file, "a+"))) {
		echo "\n\rWarning: Cannot open  file \"" . $the_log_file . "\"\n";
		return FALSE;
		;
	}
	flock($fp, LOCK_EX);
	fputs($fp, $message);
	fclose($fp);
	return TRUE;
}
?>